package demo4;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @author Huangjin
 * @version 1.0
 * describe:
 * @date 2023/2/24 17:32
 */
public class TimerDemo {
    public static void main(String[] args) {
        Timer timer = new Timer();
        int interval = 1000;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("敲完了");
            }
        },interval,interval);
    }
}
